home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / glass / glass.lha / GLASS / tmc / Makefile < prev    next >
Makefile  |  1991-02-14  |  5KB  |  235 lines

  1. # tm C support make file
  2.  
  3. VERSION = 4
  4.  
  5. # debugging flags
  6. DBUG        = -DSTAT
  7. LINTDBUG    = $(DBUG) $(SYSCDBUGFLAGS)
  8.  
  9. LDFLAGS          = $(SYSCDBUGFLAGS) $(DBUG)
  10.  
  11. # C compilation flags
  12. CFLAGS = $(SYSCDBUGFLAGS) -I$(IDIR) $(DBUG) -D$(SYS)
  13.  
  14. LINTFLAGS = $(SYSLINTFLAGS) -I$(IDIR) $(LINTDBUG) -D$(SYS)
  15.  
  16. # Some names of programs
  17. TM  = tm
  18. LINKER = cc
  19.  
  20. TMCLIB = $(LDIR)/libtmc.a
  21. TMCLINTLIB = $(LDIR)/llib-ltmc.ln
  22.  
  23. LIBS = $(TMCLIB) $(CLIBLOC)
  24.  
  25. LINTLIBS = $(TMCLINTLIB)
  26.  
  27. MAKEFILE = Makefile
  28.  
  29. DOC    = readme changes
  30.  
  31. DEMOFILES =
  32.  
  33. JUNK = tmp core makelog lltest altest testerr testout alutest llutest
  34.  
  35. TESTFILES = \
  36.     test.ds \
  37.     aluokerr aluokout \
  38.     alutesti alutest.c aluspec.t alucode.ct alucode.ht \
  39.     lluokerr lluokout \
  40.     llutesti llutest.c lluspec.t llucode.ct llucode.ht
  41.  
  42. DISTFILES = $(TMMODULES) $(TESTFILES) $(DOC) $(MAKEFILE)
  43.  
  44. TMMODULES     = cal.ct cal.ht alneed.t calu.ct calu.ht aluneed.t \
  45.                 cll.ct cll.ht llneed.t cllu.ct cllu.ht lluneed.t
  46.  
  47. LLUTMSRCS     = llucode.c 
  48.  
  49. LLUTMHDRS     = llucode.h
  50.  
  51. ALUTMHDRS      = alucode.h
  52.  
  53. ALUTMSRCS      = alucode.c
  54.  
  55.  
  56. LLUTESTSRCS   = llutest.c llucode.c
  57. LLUTESTHDRS   = llucode.h
  58. LLUTESTOBJS   = llutest.o llucode.o
  59.  
  60. ALUTESTSRCS   = alutest.c alucode.c
  61. ALUTESTHDRS   = alucode.h
  62. ALUTESTOBJS   = alutest.o alucode.o
  63.  
  64. OBJS = alucode.o alutest.o llucode.o llutest.o
  65.  
  66. # These sources are generated from tm templates.
  67. TMOUT = alucode.c alucode.h llucode.c llucode.h
  68.  
  69. #++ make module local start, do NOT touch this line. ++
  70. # Installation dependent make variables for ericv on HERMES 
  71.  
  72. # full path of the ESPRIT environment
  73. ESPRITDIR = /home1/forfun
  74.  
  75. #  BDIR     : bin directory
  76. BDIR = $(ESPRITDIR)/binA
  77.  
  78. #  IDIR     : include directory
  79. IDIR = $(ESPRITDIR)/include
  80.  
  81. #  LDIR     : library directory
  82. LDIR = $(ESPRITDIR)/libA
  83.  
  84.  
  85. NFULLDS = $(ESPRITDIR)/ds/nfullgl.ds
  86. NKERNDS = $(ESPRITDIR)/ds/nkerngl.ds
  87.  
  88. #  HOSTNAME : name of installation machine.
  89. HOSTNAME=hermes
  90.  
  91. # SYS     : name of operating system or machine type
  92. #     BSD    For generic BSD systems
  93. #     AVIION    For generic DG_UX systems
  94. #     HPUX    For all HP-UX systems
  95. #     SUN    For all SUN systems
  96. #     APOLLO    For all Apollo systems
  97. SYS = AVIION
  98.  
  99. # CLIBLOC : required C libraries
  100. CLIBLOC =
  101.  
  102. LINTLIBLOC =
  103.  
  104. PASLIBLOC =
  105.  
  106. # CBADADR : address that will cause a core-dump if read or written.
  107. CBADADR = 0
  108.  
  109. SYSLINTFLAGS = -hpac
  110. SYSCFLAGS = 
  111. SYSCPROFFLAGS =
  112. SYSCDBUGFLAGS =
  113. SYSPFLAGS =
  114. OFLAG= -O
  115. # Collection of host dependent make rules.
  116.  
  117. ### libinstall ###
  118. # MODULE    - module to install
  119. libinstall:
  120.     cp $(MODULE) $(LDIR)/$(MODULE)
  121.  
  122. ### includeinstall ###
  123. # MODULE    - module to install
  124. includeinstall:
  125.     cp $(MODULE) $(IDIR)/$(MODULE)
  126.  
  127. ### maninstall ###
  128. # MAN        - manual page to install
  129. maninstall:
  130.     cp $(MAN) /usr/man/manl
  131.  
  132. ### bininstall ###
  133. # MODULE    - module to install
  134. bininstall:
  135.     cp $(MODULE) $(BDIR)/$(MODULE)
  136.     strip $(BDIR)/$(MODULE)
  137.  
  138. ### arlibinstall ###
  139. # MODULE    - module to install
  140. arlibinstall:
  141.     cp $(MODULE) $(LDIR)/$(MODULE)
  142.  
  143. LINK.c=$(CC) 
  144. #++ make module local end, do NOT touch this line. ++
  145.  
  146. help :
  147.     @echo " Possible make targets:"
  148.     @echo "all        Create local running programs."
  149.     @echo "clean        Free disk space."
  150.     @echo "distfiles    List distribution files."
  151.     @echo "install        Install relevant files."
  152.     @echo "setup        Adapt sources to local situation."
  153.     @echo "test        Run tests."
  154.  
  155. #
  156. all: llutest alutest
  157.  
  158. # Add rules for the programs themselves here.
  159.  
  160. test : llutestrun alutestrun
  161.  
  162. alinstall : alneed.t cal.ct cal.ht
  163.     cat alneed.t cal.ct > $(LDIR)/cal.ct
  164.     cat alneed.t cal.ht > $(LDIR)/cal.ht
  165.  
  166. alutest:     $(ALUTESTOBJS)
  167.     $(LINKER) $(LDFLAGS) $(ALUTESTOBJS) $(LIBS) -o alutest
  168.  
  169. alutestrun: alutest alutesti
  170.     -sh -c './alutest < alutesti > testout 2> testerr'
  171.     diff testout aluokout
  172.     diff testerr aluokerr
  173.  
  174. alulint: $(ALUTESTSRCS) $(ALUTESTHDRS)
  175.     lint $(LINTFLAGS) $(ALUTESTSRCS) $(LINTLIBS) > alulint
  176.  
  177. aluinstall : aluneed.t calu.ct calu.ht
  178.     cat aluneed.t calu.ct > $(LDIR)/calu.ct
  179.     cat aluneed.t calu.ht > $(LDIR)/calu.ht
  180.  
  181. llinstall : llneed.t cll.ct cll.ht
  182.     cat llneed.t cll.ct > $(LDIR)/cll.ct
  183.     cat llneed.t cll.ht > $(LDIR)/cll.ht
  184.  
  185. llutest:     $(LLUTESTOBJS)
  186.     $(LINKER) $(LDFLAGS) $(LLUTESTOBJS) $(LIBS) -o llutest
  187.  
  188. llutestrun: llutest llutesti
  189.     -sh -c './llutest < llutesti > testout 2> testerr'
  190.     diff testout lluokout
  191.     diff testerr lluokerr
  192.  
  193. llulint: $(LLUTESTSRCS) $(LLUTESTHDRS)
  194.     lint $(LINTFLAGS) $(LLUTESTSRCS) $(LINTLIBS) > llulint
  195.  
  196. lluinstall : lluneed.t cllu.ct cllu.ht
  197.     cat lluneed.t cllu.ct > $(LDIR)/cllu.ct
  198.     cat lluneed.t cllu.ht > $(LDIR)/cllu.ht
  199.  
  200. install: llinstall alinstall lluinstall aluinstall
  201.  
  202. lint : alulint llulint
  203.  
  204. clean:
  205.     rm -f $(JUNK) $(OBJS) $(TMOUT)
  206.  
  207. distfiles:
  208.     @echo $(DISTFILES) | tr ' ' '\012'
  209.  
  210. setup:
  211.     modmake local ../make.local $(MAKEFILE)
  212.  
  213. # Non-standard make rules
  214.  
  215. depend: $(LLUTMSRCS) $(LLUTMHDRS) $(ALUTMHDRS) $(ALUTMSRCS)
  216.     mkmf -I$(IDIR) -f $(MAKEFILE)
  217.  
  218. alucode.c : alucode.ct calu.ct aluspec.t test.ds aluneed.t
  219.     $(TM) test.ds alucode.ct > alucode.c
  220.  
  221. alucode.h : alucode.ht calu.ht aluspec.t test.ds aluneed.t
  222.     $(TM) test.ds alucode.ht > alucode.h
  223.  
  224. llucode.c : llucode.ct cllu.ct lluspec.t test.ds lluneed.t
  225.     $(TM) test.ds llucode.ct > llucode.c
  226.  
  227. llucode.h : llucode.ht cllu.ht lluspec.t test.ds lluneed.t
  228.     $(TM) test.ds llucode.ht > llucode.h
  229.  
  230. ###
  231. alucode.o: alucode.h
  232. alutest.o: alucode.h
  233. llucode.o: llucode.h
  234. llutest.o: llucode.h
  235.